<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of ubigeoClass
 *
 * @author USUARIO
 */
class ubigeoClass
{
   
    
    public function getListaPaises()
    {
        $criteria = new Criteria();
        $criteria->add(CountryPeer::HABILITADO,1);
        $criteria->addAscendingOrderByColumn(CountryPeer::NAME);
        return CountryPeer::doSelect($criteria);
    }
    
    public function getListaCiudades($idPais=NULL)
    {        
        $criteria = new Criteria();
        if($idPais!=NULL)
        {
            $criteria->add(CityPeer::COUNTRY_ID,$idPais);
        }
        $criteria->addAscendingOrderByColumn(CityPeer::NAME);
        $criteria->add(CityPeer::HABILITADO,1);
        return CityPeer::doSelect($criteria);
    }
    
}

?>
